<script setup lang="ts">
import { ref } from 'vue'
import {queryUserById} from '../api/api'

const loginDto = ref({
  username: '',
  password: ''
})

const submitForm = (value: any) => {
  console.log(value);
  console.log('submit');
  
  const res = queryUserById()
  console.log(res);

}

</script>

<template>
  <h2>登录页面</h2>
  <div>
    <el-form ref="ruleFormRef" :model="loginDto" status-icon label-width="auto" class="demo-ruleForm">
      <el-form-item label="用户名：" prop="pass">
        <el-input v-model="loginDto.username" autocomplete="off" />
      </el-form-item>
      <el-form-item label="密码：" prop="checkPass">
        <el-input v-model="loginDto.password" type="password" autocomplete="off" />
      </el-form-item>
      <el-button type="primary" @click="submitForm(loginDto)">
        登录
      </el-button>
    </el-form>
  </div>
</template>

<style scoped></style>
